<template>
	<view>
		<button @click="onLog()">console.log</button>
		<button @click="onDebug()">console.dedug</button>
		<button @click="oninfo()">console.info</button>
		<button @click="onwarn()">console.warn</button>
		<button @click="onError()">console.error</button>
	</view>
</template>

<script>
	export default {
		data() {
			return {
				title:'打印日志'
			}
		},
		methods: {
			onLog(){
				//常规写法
				console.log("onLog()--> " + this.title);
				//clog
				console.log("clog");
				//clogv
				console.log('----this.title',this.title)
			},
			onDebug(){
				console.debug("onDebug():这是一个调试日志");
			},
			onInfo(){
				console.info("onInfo():这是一个信息日志")
			},
			onwarn(){
				if(name ==='wyh'){
					console.log("onwarn --->登陆验证成功");
				}else{
					console.warn("this is warn log")
				}
			},
			onError(){
				console.error(" this is error message");
				try{
					//...
				}catch(e){
					console.error("catch " + e)
				}
			}
			
		}
	}
</script>

<style>
button{
	margin: 30rpx;
}
</style>
